<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class form extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->load->library('base');
        $this->load->library('auth');
    }

    public function index()
    {
        $this->auth->is_logged_in('form/login', 0);
        $this->home();
    }

    public function login()
    {
        $this->base->head_html('Login');
        $this->load->view('login');
    }

    public function home()
    {
        $this->base->head_html('Home');
        if($this->session->userdata("ID_MEMBER_TYPE") == 2)//KOPERASI
            $this->load->view('home');
        else if($this->session->userdata("ID_MEMBER_TYPE") == 3)//TOKO
            $this->load->view('home_toko');
    }
}